Enable System Logging

System logs are a valuable diagnostic tool. You can send log messages to flash files for later retrieval.

About this task

Configure logging to a flash file at all times as a best practice.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable system logging:

    boot config flags logging

Variable Definitions

The following table defines parameters for the boot config command.

Variable

Value

flags logging

Enables or disables logging to a flash file. The log file is named using the format log.xxxxxxxx.sss. The first six characters after the prefix of the file name log contain the last three bytes of the chassis base MAC address. The next two characters specify the slot number. The last three characters denote the sequence number of the log file.

logfile <64-500> <500-16384> <10-90>

Configures the following log file parameters:

  • <64-500> specifies the minimum free memory space on /intflash from 64–500 KB. Although you can currently use this parameter, it does not alter the configuration.

  • <500-16384> specifies the maximum size of the log file from 500–16384 KB.

  • <10-90> specifies the maximum percentage, ranging from 10–90 percent, of space on /intflash the logfile can use. Although you can currently use this parameter, it does not alter the configuration.

The maximum number of log files is 1,000. The maximum size of one log file is 1,024 KB.